#!/bin/bash

API_URL="http://localhost:8080/your-api"

echo "🟡 测试 1: 不带 Token"
curl -s -o /dev/null -w "%{http_code}\n" "$API_URL"

echo "🟢 测试 2: 正确 Token"
curl -s -o /dev/null -w "%{http_code}\n" -H "Authorization: valid-token" "$API_URL"

echo "🔴 测试 3: 错误 Token"
curl -s -o /dev/null -w "%{http_code}\n" -H "Authorization: invalid-token" "$API_URL"
